

import { Controller } from 'egg';

export default class AlbumController extends Controller {


    // /album?id=3029079
    public async index() {
        const { id } = this.ctx.query;
        const data = {};
        const url = `/weapi/v1/album/${id}`;
        let result: any = await this.service.mequest.createWebAPIRequest(url, 'POST', data);
        const { body, } = result;
        this.ctx.body = body;
    }

    //新碟上架
    public async new(){
        const {offset,limit}=this.ctx.query;
        const data = {
            offset: offset || 0,
            total: true,
            limit: limit || 50,
            // area: type,
        }
        const url = `/weapi/album/new`;
        let result = await this.service.mequest.createWebAPIRequest(url, 'POST', data);
        this.ctx.body = result.body;
    }

}